﻿using System;
using System.Collections.Generic;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace TM.QWeibo.Dal
{
    public class HuaTi:Base
    {
        /// <summary>
        /// 实例
        /// </summary>
        public static HuaTi Instance
        {
            get
            {
                return new HuaTi();
            }
        }

        #region 私有变量

        /// <summary>
        /// API
        /// </summary>
        readonly SDK.API.HuaTi _Api = new SDK.API.HuaTi(OAuthInstance);

        #endregion

        public void Trend(Action<List<SDK.Objects.HuaTi>> callback)
        {
            _Api.Trend(20,0,(rs)=>
                                {
                                    var d = new List<SDK.Objects.HuaTi>();
                                    if (rs.Data != null && rs.Data.Info!=null)
                                    {
                                        d = rs.Data.Info;
                                    }
                                    callback(d);
                                });
        }
    }
}
